package com.gupaoedu.springboot.springbootfirst.firstDemo;

import org.springframework.stereotype.Service;

/**
 * @Author: JLL
 * @Date: 2019/7/4 14:37
 */
@Service
/**
 * //这个类已经通过@Bean加入IOC了  ，如果再加@Service 。启动会报错：IOC中有2个一样的bean
 * 报错：
 * The bean 'demoClass', defined in class path resource [com/gupaoedu/springboot/springbootfirst/firstDemo/ConfigurationDemo.class], could not be registered.
 * A bean with that name has already been defined in file [E:\git_projects\spring-boot-first\target\classes\com\gupaoedu\springboot\springbootfirst\firstDemo\DemoClass.class] and overriding is disabled.
 */
public class DemoClass {

    public void testMethod(){
        System.out.println("demoClass的方法");
    }

}
